import config from "@/config"
import http from "@/utils/request"

export default {
    list: {
        url: `${config.API_URL}/company/department/lists`,
        name: "部门列表",
        get: async function (params = {}) {
            return await http.get(this.url, params);
        }
    },
    add: {
        url: `${config.API_URL}/company/department/add`,
        name: "新增部门",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        }
    },
    edit: {
        url: `${config.API_URL}/company/department/edit`,
        name: "编辑部门",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        },
        get: async function (params = {}) {
            return await http.get(this.url, params);
        }
    },
    delete: {
        url: `${config.API_URL}/company/department/delete`,
        name: "删除部门",
        post: async function (data = {}) {
            return await http.post(this.url, data);
        }
    }
}